Skip to content

🐛 Fix #599 add lazy support for potential self-referential types (plus unit tests)#907

Merged
Code-Hex merged 1 commit intoCode-Hex:mainfrom
btoo:nickdegroot/fix-recursive-types
Sep 23, 2025
Merged

🐛 Fix #599 add lazy support for potential self-referential types (plus unit tests)#907
Code-Hex merged 1 commit intoCode-Hex:mainfrom
btoo:nickdegroot/fix-recursive-types

Conversation

@btoo
Copy link
Copy Markdown

@btoo btoo commented Dec 8, 2024

@btoo btoo force-pushed the nickdegroot/fix-recursive-types branch from 0649842 to 3d7cd83 Compare December 8, 2024 02:46
@btoo btoo changed the title add unit tests for 🐛 Fix #599 add lazy support for potential self-referential types 🐛 Fix #599 add lazy support for potential self-referential types (plus unit tests) Dec 8, 2024
@btoo
Copy link
Copy Markdown
Author

btoo commented Dec 18, 2024

hey @Code-Hex i saw you ran the CI checks for me. thanks!

i noticed that it failed and, taking a wild guess, seemingly for a reason unrelated to the PR?

INPUT_BRANCH value: nickdegroot/fix-recursive-types
From https://github.com/Code-Hex/graphql-codegen-typescript-validation-schema
 * [new branch]      main       -> origin/main
fatal: invalid reference: nickdegroot/fix-recursive-types
Error: Invalid status code: 128
    at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:17:19)
    at ChildProcess.emit (node:events:519:[28](https://github.com/Code-Hex/graphql-codegen-typescript-validation-schema/actions/runs/12218195678/job/34143875355?pr=907#step:7:29))
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:[30](https://github.com/Code-Hex/graphql-codegen-typescript-validation-schema/actions/runs/12218195678/job/34143875355?pr=907#step:7:31)5:5) {
  code: 128
}
Error: Invalid status code: 128
    at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:17:19)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

any idea how this happened?

@btoo btoo force-pushed the nickdegroot/fix-recursive-types branch from 3d7cd83 to c94ef9e Compare January 15, 2025 05:44
@Code-Hex
Copy link
Copy Markdown
Owner

@btoo Did you try running tests on your local?

@fcsonline
Copy link
Copy Markdown

It would be awesome to unlock this. 🙏

@btoo
Copy link
Copy Markdown
Author

btoo commented Apr 7, 2025

@btoo Did you try running tests on your local?

@Code-Hex yes i did - it passes locally

@DavidRodriguezHidalgo
Copy link
Copy Markdown

Any chance that we can help unblocking this? 🙏🏼

@mshafir
Copy link
Copy Markdown

mshafir commented Sep 15, 2025

Looking for this as well, seemed so close! Where is it stuck?

@Code-Hex
Copy link
Copy Markdown
Owner

Sorry, I forgot about this PR. I'll check this

Code-Hex added a commit that referenced this pull request Sep 23, 2025
@Code-Hex Code-Hex merged commit 342b1b3 into Code-Hex:main Sep 23, 2025
Code-Hex added a commit that referenced this pull request Sep 23, 2025
@Code-Hex Code-Hex mentioned this pull request Sep 23, 2025
Code-Hex added a commit that referenced this pull request Sep 23, 2025
@Code-Hex
Copy link
Copy Markdown
Owner

I just published https://github.com/Code-Hex/graphql-codegen-typescript-validation-schema/releases/tag/v0.18.1

email: v.nullish(v.string()),
id: v.nullish(v.string()),
kind: v.nullish(UserKindSchema()),
kind: v.lazy(() => v.nullish(UserKindSchema())),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generated schema here seems invalid, since it results in a non-nullish field kind. Correct would have been:

    kind: v.nullish(v.lazy(() => UserKindSchema())),

While not explicitly mentioned in the documentation it can be seen from the example.

Can this be fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants